import React from 'react';
import ReactDOM from 'react-dom';
import RouteComponent from '@/router';
import './index.scss';
import 'antd-mobile/dist/antd-mobile.css';
import reportWebVitals from './reportWebVitals';
// import 'lib-flexible';
import { store } from './store';

// The only way to mutate the internal state is to dispatch an action.
// The actions can be serialized, logged or stored and later replayed.
store.dispatch({ type: 'counter/incremented' });
// {value: 1}
store.dispatch({ type: 'counter/incremented' });
// {value: 2}
store.dispatch({ type: 'counter/decremented' });
// {value: 1}
ReactDOM.render(
  <React.StrictMode>
    <RouteComponent />
  </React.StrictMode>,
  document.getElementById('root'),
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
